import request from '@/utils/request'

// 查询管辖区域列表
export function listSysManageRegion (query) {
  return request({
    url: '/sys/sysManageRegion/roomList',
    method: 'get',
    params: query
  })
}

// 查询管辖区域详细
export function getSysManageRegion (id) {
  return request({
    url: '/sys/sysManageRegion/' + id,
    method: 'get'
  })
}

// 新增管辖区域
export function addSysManageRegion (data) {
  return request({
    url: '/sys/sysManageRegion',
    method: 'post',
    data: data
  })
}

// 修改管辖区域
export function updateSysManageRegion (data) {
  return request({
    url: '/sys/sysManageRegion',
    method: 'put',
    data: data
  })
}

// 删除管辖区域
export function delSysManageRegion (id) {
  return request({
    url: '/sys/sysManageRegion/' + id,
    method: 'delete'
  })
}

// 导出管辖区域
export function exportSysManageRegion (query) {
  return request({
    url: '/sys/sysManageRegion/export',
    method: 'get',
    params: query
  })
}
// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/sys/sysManageRegion/getInitData/' + dictTypes,
    method: 'get'
  })
}

// 获取初始化数据
export function listTree (params) {
  return request({
    url: '/sys/sysManageRegion/listTree',
    method: 'get',
    params: params
  })
}

// 新增管辖区域
export function addRoom (data) {
  return request({
    url: '/sys/sysManageRegion/addRoom',
    method: 'post',
    data: data
  })
}

// 新增管辖区域
export function delRoom (ids) {
  return request({
    url: '/sys/sysManageRegion/removeRoom/' + ids,
    method: 'delete'
  })
}

// 获取初始化数据
export function listRegionTree (params) {
  return request({
    url: '/sys/sysManageRegion/listRegionTree',
    method: 'get',
    params: params
  })
}
